<template>
<div class="pad5">
  <mu-paper :z-depth="3" rounded>
    <div class="pad8 flrc">
      <div class="flex1"><title-a>物业费账单生成</title-a></div>
      <div><mu-button color="primary" @click="goback()" icon><mu-icon value="exit_to_app"></mu-icon></mu-button></div>
    </div>
  </mu-paper>
  <mu-paper class="mart10" :z-depth="3" rounded>
    <div class="pad5">
      <title-a>物业费账单生成</title-a>
      <div>
        <div class="pad5 mart20">
          <EzData :config="config" v-model="model"></EzData>
          <div class="tac ">
<!--            <mu-button color="primary">预检</mu-button>-->
            <mu-button class="marl20" color="primary" @click="fastCreate">创建</mu-button>
            <mu-button class="marl20" @click="goback()">返回</mu-button>
          </div>
        </div>
      </div>
    </div>
  </mu-paper>

</div>
</template>

<script>
import TitleA from "@/comps/comm/TitleA.vue";
import formBuilder from "@/comps/form/formBuilder";
import EzData from "@/comps/EzData.vue";
import apiFeeHouse from "@/pages/v1/pm/FeeHouse/js/apiFeeHouse";

export default {
  name: 'fastCreate',
  components: {EzData, TitleA},
  data () {
    let config = formBuilder()
    config.addText("title","收费主题",6)
    config.addDateTime("start","开始日期",3).setDateTypeMonth()
    config.addDateTime("end","结束日期",3).setDateTypeMonth()

    return {
      config: config,
      model:{},

    }
  },
  methods: {
    fastCreate(){
      apiFeeHouse.fastCreate(this.model,res=>{
        this.$toast.success(res.message)
        this.$confirm("是否返回列表查看").then((rst)=>{
          if(rst){
            this.goback()
          }else {
            return false
          }
        })
      })
    }
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>